<?php
require_once("../config.php"); 
require_once("../model/DB.php");
require_once("../model/Kid.php");

if($_POST['id']!=0){
	if(Kid::editKid($_POST['id'],$_POST['name'],$_POST['parent'],$_POST['Class'],$_POST['age'],$_POST['height'],$_POST['weight'])){
		echo "saved";
	}	
}
else{
	if(Kid::addKid($_POST['name'],$_POST['parent'],$_POST['Class'],$_POST['age'],$_POST['height'],$_POST['weight'])){
		echo "added";
	}
}


?>